package com.digua.base.socket.request

import org.java_websocket.client.WebSocketClient
import org.java_websocket.framing.Framedata


class FrameDataRequest : Request<Framedata> {

    private var framedata: Framedata? = null

    override fun setRequestData(data: Framedata) {
        framedata = data
    }

    override fun getRequestData(): Framedata? = framedata

    override fun send(client: WebSocketClient?) {
        client?.sendFrame(framedata)
    }

    override fun release(){
        RequestFactory.releaseFrameDataRequest(this)
    }

    override fun toString() = "[@FrameDataRequest${hashCode()},Framedata:${framedata?.toString() ?: "null"}]"
}